package com.campus.app.service.impl;

import com.campus.commons.entity.RoleMenu;
import com.campus.app.mapper.RoleMenuMapper;
import com.campus.app.service.RoleMenusService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.campus.commons.utils.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 角色菜单关系表 服务实现类
 * </p>
 *
 * @author Rin
 * @since 2020-12-24
 */
@Service
public class RoleMenuServiceImpl extends ServiceImpl<RoleMenuMapper, RoleMenu> implements RoleMenusService {
    @Autowired
    private RoleMenuMapper roleMenuMapper;
    @Override
    public Result addRoleMenu(RoleMenu roleMenu) {
        return Result.result(roleMenuMapper.insert(roleMenu));
    }

    @Override
    public Result delRoleMenu(Integer id) {
        return Result.result(roleMenuMapper.deleteById(id));
    }
}
